<template>
  <div class="right">
    <template v-if="cityList[tabIndex]">
      <span
        @click="onCityItem(item)"
        v-for="item in cityList[tabIndex].children"
        :key="item.id"
        :class="item.check ? 'active' : ''"
      >
        {{ item.city }}
      </span>
    </template>
  </div>
</template>

<script>
export default {
  props: {
    cityList: Array,
    tabIndex: Number,
  },
  methods: {
    onCityItem(item) {
      this.$emit('onCityItem', item)
    },
  },
}
</script>

<style></style>
